package com.xiaoshuidi.cloud.module.report.dal.mapper.datamanage;

import com.xiaoshuidi.cloud.framework.mybatis.core.mapper.BaseMapperX;
import com.xiaoshuidi.cloud.module.report.controller.datamanage.vo.*;
import com.xiaoshuidi.cloud.module.report.dal.DO.ContractRoomDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.LinkedHashMap;

@Mapper
public interface LeaseAnalysisMapper extends BaseMapperX<ContractRoomDO> {


    List<OwnersSignContractsCountVO> ownersSignContractsAnalysis(@Param("vo") OwnerAnalysisReqVO vo);

    /**
     * 业主年龄分析
     *
     * @param vo
     * @return
     */
    LinkedHashMap<String, Long> ownersAgeAnalysis(@Param("vo") OwnerAnalysisReqVO vo);


    /**
     * 租赁周期分析
     *
     * @param vo
     * @return
     */
    LinkedHashMap<String, Long> ownersPeriodAnalysis(@Param("vo") OwnerAnalysisReqVO vo);

    /**
     * 业主合同分析
     *
     * @param vo
     * @return
     */
    List<OwnerContractAnalysisRespVO> ownerContractAnalysis(@Param("vo") OwnerAnalysisReqVO vo);

    /**
     * 租赁合同分析
     * 续租合同以及换房合同原合同不计入退租
     * 新签合同包含 新签与换房合同
     *
     * @param vo
     * @return
     */
    List<LeaseContractAnalysisRespVO> leaseContractAnalysis(@Param("vo") LeaseAnalysisReqVO vo);

    /**
     * 租客签约
     *
     * @param vo
     * @return
     */
    List<LeaseSignContractsCountVO> leaseSignContractsAnalysis(@Param("vo") LeaseAnalysisReqVO vo);

    /**
     * 租客签约 租期时长
     *
     * @param vo
     * @return
     */
    LinkedHashMap<String, Long> leasePeriodAnalysis(@Param("vo") LeaseAnalysisReqVO vo);

    /**
     * 租客签约 年龄段分布
     *
     * @param vo
     * @return
     */
    LinkedHashMap<String, Long> leaseAgeAnalysis(@Param("vo") LeaseAnalysisReqVO vo);

}
